<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h2> 车辆质量投诉列表</h2>
<form method="post" action="/veh/list" th:action="@{/veh/list}"  >
    品牌<select name="brandId" id="brandId" class="form-control">
        <option value="0">--请选择--</option>

    </select>
    <input type="button" value="查询" name="cx" id="cx"> <input type="button" value="添加投诉" th:onclick="add()">
</form>
<table border="1">
    <tr>
        <th>投诉编号</th>
        <th>投诉品牌</th>
        <th>投诉问题</th>
        <th>投诉车系</th>
        <th>投诉时间</th>
        <th>投诉状态</th>
        <th>投诉操作</th>
    </tr>
    <tr th:each="vs:${vc}">
        <td th:text="${vs.id}"></td>
        <td th:text="${vs.brand.brandName}"></td>
        <td th:text="${vs.problem}"></td>
        <td th:text="${vs.carType}"></td>
        <td th:text="${#dates.format(vs.complaintsTime,'yyyy-MM-dd')}"></td>
        <td th:if="${vs.status==0}">信息审核</td>
        <td th:if="${vs.status==1}">厂家受理</td>
        <td><a th:src="@{modify.html}" th:style="">编辑</a></td>
    </tr>
</table>
</body>
<script src="../../static/js/jquery.js"></script>
<script>
    // $(document).ready(function(){
    //     $.ajax({
    //         type:"GET",
    //         url:"/brand/selectAll",
    //         dataType:"json",
    //         success:function(data){
    //             //获取model中roleId
    //             var brandId=[[${brandId}]];
    //             // alert("json："+data);
    //             for(var i in data){
    //                 var op="<option ";
    //                 if(data[i].brandId==brandId){
    //                     op+=" selected='selected' ";
    //                 }
    //                 op+= " value='"+data[i].brandId+"'>"+data[i].brandName+"</option>";
    //                 $("#brandId").append(op);
    //             }
    //         },
    //         error:function(data){
    //             alert("对不起，获取数据失败！");
    //         }
    //     });
    // });
</script>
</html>